package com.linxi.rpccompensation.api;

import com.linxi.rpccompensation.entity.SysPushLog;
import com.linxi.rpccompensation.service.PushLogService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description:
 * @author：lx
 * @date: 2021/09/27 下午 11:50
 * @Copyright： lx
 */
@RestController
@RequestMapping("/test")
public class TestApi {

	@Resource
	private PushLogService pushLogService;

	@PostMapping("/list")
	public List<SysPushLog> list() {
		return pushLogService.list();
	}

	@PostMapping("/doPushTask")
	public void doPushTask(@RequestBody SysPushLog pushLog) throws Exception {
		pushLogService.doPushTask(pushLog);
	}
}
